|
|
|
|
|
|
|
Understanding the Purpose of This Subsystem |
|
|
|
|
|
|
|
|
The subsystem decouples the typical database access interface from its particular implementation so that you can freely choose your favorite mechanism without much change to the rest of your application. It handles the persistence of your objects or other variables that aren't properties of objects (though it's advisable to have important variables housed as properties in objects). |
|
|
|
|
|
|
|
|
Implementing a Common Interface for Different Database Models |
|
|
|
|
|
|
|
|
IDatabase is the common interface shared by objects that participate in the various data access mechanisms Visual Basic developers use. IDatabase is owned by the IPersistence interface class. By owned, it's meant that you would access a method of an IDatabase object as follows: |
|
|
|
|
|
|
|
|
thePersistence.theDatabase.Connect() |
|
|
|
|
|
|
|
|
The spirit of this lesson coincides with Microsoft's push toward its Universal Data Access umbrella: Microsoft Universal Data Access (UDA). UDA is a new Microsoft architecture that promises to provide efficient access to a variety of data formatsrelational and nonrelationalon different platforms across your enterprise. UDA gives you a developer-friendly programming interface that can be used with Visual Basic. |
|
|
|
|
|
|
|
|
Microsoft stated that UDA is based on open industry specifications, therefore supporting more than just Microsoft platforms. In many ways, like its predecessor ODBC, UDA works with all of today's major database platforms. This feature enables you to seamlessly migrate data from one database product to another, compared with more complex migration strategies in place today. Also, if you have an environment mixed with newer and older database technologies, UDA gives you the ability to leverage and extend current persistence storage repositories. |
|
|
|
|
|
|
|
|
Figure 19.1 illustrates how each UDA component fits into the overall UDA architecture. ADO offers developers an interface to persistent information. Remote Data Service (RDS), which was known as the Active Data Connector, is a client-side component used by ADO to provide the following features: |
|
|
|
|
|
|
|
|
Opening and managing database cursors |
|
|
|
|
|
|
|
|
Explicit access to remote recordsets |
|
|
|
|
|